]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
dash: Fix leaking signal connections
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 27 Feb 2015 01:09:02 +0000 (02:09 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Fri, 27 Feb 2015 13:16:30 +0000 (14:16 +0100)
The overview has a longer life-time than dash items, so we are
leaking a signal connection each time an item is destroyed.
Spotted by Michele (<micxgx@gmail.com>)

https://bugzilla.gnome.org/show_bug.cgi?id=744575

js/ui/dash.js

index 146480c3099610dd8a458bffb52cb5dbbc2c31b7..2f48a7add2060ed678f3ae363bb09929267ada0b 100644 (file)
@@ -519,10 +519,13 @@ const Dash = new Lang.Class({
             this._syncLabel(item, appIcon);
         }));
 
-        Main.overview.connect('hiding', Lang.bind(this, function() {
+        let id = Main.overview.connect('hiding', Lang.bind(this, function() {
             this._labelShowing = false;
             item.hideLabel();
         }));
+        item.child.connect('destroy', function() {
+            Main.overview.disconnect(id);
+        });
 
         if (appIcon) {
             appIcon.connect('sync-tooltip', Lang.bind(this, function() {